package diaosidadui.exception;

public class Test {
    public static void main(String[] args) {

        System.out.println("开始");
        method();
        System.out.println("结束");

    }

    public static void method(){



            try{
                int[] arr = {1,2,3,4};
                System.out.println(arr[4]);
            }catch (Exception a){
                System.out.println(a.getMessage());
                a.printStackTrace();
                System.out.println(a.toString());
            }

    }
}
